//package com.open.capacity.lisenter;
//
//
//import com.open.capacity.service.impl.SendMailService;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//@Component
//@RabbitListener(queues = "mailQueue")
//public class MailQueueReceiver {
//    @Autowired
//    private SendMailService sendMailService;
//
//    @RabbitHandler
//    public void process(String mail) {
//        try {
//            System.out.println("向：" + mail + "发送邮件！");
//            sendMailService.sendMail(mail);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//}
